package com.example.tse.rbhttpservice.service.member.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.member.model.MemberOrderGetList;
/**
 * 获取我的订单列表，订单状态包括待支付、待发货、待收货、已完成、已取消
 * @author wliu
 * edit tse
 */
public class MemberOrderGetListResponse extends RudderResponse{
    
    private List<MemberOrderGetList> getList = new ArrayList<MemberOrderGetList>();
		
	
    /**
     * @return getList
     */	
    public List<MemberOrderGetList> getGetList() { 
	    return this.getList;
    };
	
	/**
     * @return getList
     */	
    public void setGetList(List<MemberOrderGetList> getList) { 
        this.getList = getList;
    };
    
	
        
    private static void filterFor(MemberOrderGetListGoods member) {
        if (member.getProductId() == null) {
            member.setProductId("");
        }
        if (member.getName() == null) {
            member.setName("");
        }
        if (member.getPrice() == null) {
            member.setPrice("");
        }
        if (member.getQuantity() == null) {
            member.setQuantity("");
        }
        if (member.getThumbnailPic() == null) {
            member.setThumbnailPic("");
        }
        if (member.getSubTotal() == null) {
            member.setSubTotal("");
        }
        if (member.getSpec() == null) {
            member.setSpec("");
        }
    }
        
    private static void filterFor(MemberOrderGetList member) {
        if (member.getOrderId() == null) {
            member.setOrderId("");
        }
        if (member.getAddTime() == null) {
            member.setAddTime("");
        }
        if (member.getTotal() == null) {
            member.setTotal("");
        }
        if (member.getStatus() == null) {
            member.setStatus("");
        }
        if (member.getGoods() == null) {
            member.setGoods(new ArrayList<MemberOrderGetListGoods>());
        } else {
            for (MemberOrderGetListGoods item : member.getGoods()) {
                filterFor(item);
            }
        }
        if (member.getWareName() == null) {
            member.setWareName("");
        }
        if (member.getSubTax() == null) {
            member.setSubTax("");
        }
    }
        
    public static void filter(MemberOrderGetListResponse member) {
        if (member.getGetList() == null) {
            member.setGetList(new ArrayList<MemberOrderGetList>());
        } else {
            for (MemberOrderGetList item : member.getGetList()) {
                filterFor(item);
            }
        }
    }
}
